<template>
  <div class="son">
    <h4>左侧</h4>
    <p>{{ leftMsg }}</p>
    <button @click="toRight">传递给右侧的兄弟</button>
  </div>
</template>

<script>
// import bus from "../eventBus/index.js";
export default {
  data() {
    return {
      leftMsg: "我是左边的数据",
    };
  },

  methods: {
    toRight() {
      $bus.$emit("Right", this.leftMsg);
    },
  },
};
</script>

<style>
.son {
  width: 300px;
  height: 300px;
  border: 1px solid #000;
}
</style>